class bmi_check(object):
    def bmi(self, weight, height):
        bmi = weight / (height * height)
        if bmi < 18.5:
            print("过轻")
        elif 18.5 <= bmi <= 25:
            print("正常")
        elif 25 < bmi < 28:
            print("过重")
        elif 28 <= bmi < 32:
            print("肥胖")
        else:
            print("严重肥胖")

    def check_bmi_with_input(self):
        height = float(input('input your height, eg: 1.72 :'))
        weight = float(input('input your weight, eg: 80.2 :'))
        bmi_check.bmi(height, weight)


class math_method(object):
    def my_abs(self, x):
        if not isinstance(x, (int, float)):
            raise TypeError('bad operand type')
        if x >= 0:
            return x
        else:
            return -x


if __name__ == '__main__':
    pass
